Repository navigation
fix(save): write the b section's unsaved edits on save - #171
Merged
Merged
Conversation
A flicker changes section without saving, so edits made on the section you flicker away from stay in memory as the b section. saveAllData wrote only the current section, so Save and Save As left those edits out of the .jser. saveAllData now writes the b section too. Section.save skips a section that is no longer in the series, because a deleted section can still be the b section and must not get its file back.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After a flicker, the section you flickered away from keeps its unsaved edits in memory as the b section. Save and Save As wrote only the current section, so those edits were left out of the
.jser. Save now writes the b section too. A section you have deleted is not written back, even if it is still the b section.The undo problem this issue describes does not happen on
main.SectionStates.initializebuilds the undo baseline from memory, not from the file on disk, and the change that would have read the file (#82) was closed. The lost edit in the issue's Notes is the real bug, and this fixes it.Closes #83.